package com.example.shop.utils;

/**
 * @projectName: travel
 * @package: com.example.travel.utils
 * @className: ThreadLocalUtil
 * @author: Liqian
 * @description: TODO
 * @date: 2024/4/13 18:52
 * @version: 1.0
 */
public class ThreadLocalUtil {
    private static final ThreadLocal THREAD_LOCAL = new ThreadLocal<>();

    public static <T> T get() {
        return (T) THREAD_LOCAL.get();
    }

    public static void  set(Object value) {
         THREAD_LOCAL.set(value);
    }

    public static void remove(){
        THREAD_LOCAL.remove();
    }
}
